<?php


namespace biu\model;


class LogModel
{
    private $dir;// 保存目录
    private $file;// 保存文件
    private $level;// 级别
    private $time;// 级别
    private $str; // 内容

    /**
     * LogModel constructor.
     * @param $dir
     * @param $file
     * @param $level
     * @param $time
     * @param $str
     */
    public function __construct($dir, $file, $level, $time, $str)
    {
        $this->dir = $dir;
        $this->file = $file;
        $this->level = $level;
        $this->time = $time;
        $this->str = $str;
    }

    public function __toString()
    {
        return $this->time."\t".$this->str.PHP_EOL;
    }

    /**
     * @return mixed
     */
    public function getDir()
    {
        return $this->dir;
    }

    /**
     * @param mixed $dir
     */
    public function setDir($dir): void
    {
        $this->dir = $dir;
    }

    /**
     * @return mixed
     */
    public function getFile()
    {
        return $this->file;
    }

    /**
     * @param mixed $file
     */
    public function setFile($file): void
    {
        $this->file = $file;
    }

    /**
     * @return mixed
     */
    public function getLevel()
    {
        return $this->level;
    }

    /**
     * @param mixed $level
     */
    public function setLevel($level): void
    {
        $this->level = $level;
    }

    /**
     * @return mixed
     */
    public function getTime()
    {
        return $this->time;
    }

    /**
     * @param mixed $time
     */
    public function setTime($time): void
    {
        $this->time = $time;
    }

    /**
     * @return mixed
     */
    public function getStr()
    {
        return $this->str;
    }

    /**
     * @param mixed $str
     */
    public function setStr($str): void
    {
        $this->str = $str;
    }

}